<template>
  <div class="wrapper-header" style="display: flex">
    <div @click="goRouter('home')">
      <div class="logo-info">Mate Parser</div>
    </div>
    <div class="top-menu-item" @click="goRouter('MateFile')">MateFile</div>
    <div class="top-menu-item" @click="goRouter('MateParser')">MateParser</div>
    <div class="top-menu-item" @click="goRouter('SysInfo')">SysInfo</div>
    <div style="flex-grow: 1"></div>
  </div>
</template>

<script>
export default {
  name: 'HeaderBar',
  data() {
    return {};
  },
  methods: {
    goRouter(name) {
      if (this.$router.history.current.name !== name) {
        const routerObj = { name };
        this.$router.push(routerObj);
      }
    },
  },
};
</script>

<style scoped>
.logo-info {
  width: 200px;
  color: #ffffff;
  text-align: center;
  font-size: 16px;
  cursor: pointer;
}

.concat-btn {
  margin-right: 20px;
  font-size: 26px;
  color: #ffffff;
  cursor: pointer;
}
.concat-btn:hover {
  color: #dddddd;
}

.wrapper-header {
  width: 100%;
  height: 48px;
  line-height: 48px;

  top: 0;
  right: 0;
  z-index: 10;

  background-image: linear-gradient(143deg, #1d42ab, #2173dc, #1e93ff);
  background-color: #2b83f9;
}

.top-logo-item-2 {
  width: 200px;
  height: 48px;
  cursor: pointer;
}

.top-menu-item {
  color: rgba(255, 255, 255, 0.75);
  padding: 0 16px;
  font-size: 14px;
  cursor: pointer;
}

.top-menu-item:hover {
  background-color: #5bb6fd;
  color: #ffffff;
}

.username-font {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei',
    'Helvetica Neue', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
}

.login-out {
  color: white;
  font-weight: 600;
  font-size: 14px;
  line-height: 60px;
  margin-right: 20px;
  cursor: pointer;
}
</style>
